package com.otitan.la.forest.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户组织机构关系表
 *
 * @author jiacs
 * @email xxx
 * @date 2020-09-15 10:34:18
 */
@Data
@TableName("\"SYS_USER_ORG\"")
@ApiModel("用户组织机构关系表实体")
public class UserOrgEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID", required = true)
    @NotEmpty(message = "用户ID不能为空")
    @Length(max = 36, message = "用户ID不能超过 36 个字符")
    @TableId("\"USER_ID\"")
    private String userId;

    /**
     * 组织机构ID
     */
    @ApiModelProperty(value = "组织机构ID", required = true)
    @NotEmpty(message = "组织机构ID不能为空")
    @Length(max = 36, message = "组织机构ID不能超过 36 个字符")
    @TableField("\"ORG_ID\"")
    private String orgId;

    /**
     * 创建用户
     */
    @ApiModelProperty(value = "创建用户", required = false)
    @TableField(value = "\"CREATE_USER\"", fill = FieldFill.INSERT)
    private String createUser;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", required = false)
    @TableField(value = "\"CREATE_DATE\"", fill = FieldFill.INSERT)
    private Date createDate;

}
